/**
 * viewpager 组件
 * https://github.com/facebook/react-native
 * @flow
 */

import React, { Component } from 'react';
import {
    AppRegistry,
    StyleSheet,
    Text,
    View,
    ViewPagerAndroid,
} from 'react-native';
import BaseComponent from './BaseComponent';

class MyViewPager extends BaseComponent {

    render() {
        return (
            <ViewPagerAndroid style={styles.viewpagerstyle}>
                <View style={[{flex:1},{backgroundColor:'#ffff00'}]}><Text style={[{fontSize:20}]}>第一个页面</Text></View>
                <View style={[{flex:1},{backgroundColor:'#ff0000'}]}><Text style={[{fontSize:20}]}>第二个页面</Text></View>
                <View style={[{flex:1},{backgroundColor:'#ff00ff'}]}><Text style={[{fontSize:28}]}>第三个页面</Text></View>
                <View style={[{flex:1},{backgroundColor:'#ff0000'}]}><Text style={[{fontSize:16}]}>第四个页面</Text></View>
            </ViewPagerAndroid>
        );
    }
}

const styles = StyleSheet.create({
    viewpagerstyle:{
        flex:1,
    }

});
module.exports=MyViewPager;

